<%@ include file="/taglib-imports.jspf" %>

<tiles:insert definition="backend.layout">
    <%@ include file="/edu/uoc/tfc/gui/security/gestioUsuaris/gestio-usuaris-dades-javascript.jspf" %>

    <tiles:put name="body" type="string">
		<%@ include file="/edu/uoc/tfc/gui/security/gestioUsuaris/gestio-usuaris-dades-cerca-usuaris.jspf" %>
		
		<emkt:dataTables
			tableName="buscarUsuarios"
			action="/CUGestioUsuaris/GestioUsuarisDadesCercaUsuaris.do"
			columnNames="dto.usuari.userId,dto.usuari.nom,dto.usuari.primerCognom,dto.usuari.segonCognom"
			columnAttributes="userId,nom,primerCognom,segonCognom"
			columnWidths="10,30,30,30"
			footer="true"
			searchOnLoad="false"
			prettyWrite="true"
			bytoken="false">
		
			<authz:authorize ifAnyGranted="ROLE_ADMIN">	
				<emkt:dataTablesButton
					iconClass="icon-pencil"
					label="datatables.edit"
					operation="/CUGestioUsuaris/GestioUsuarisDadesModificaUsuari.do"
					columnName="userId"
					readonly="false"
					bytoken="false"
					modalClass="modal-emkt-big"
				/>
				
				<emkt:ajaxButton
					iconClass="icon-plus-sign"
					label="datatables.newUsuari"
					operation="/CUGestioUsuaris/GestioUsuarisDadesAltaUsuari.do"					
					bytoken="false"
					modalClass="modal-emkt-medium"
				/>				
			</authz:authorize>
		</emkt:dataTables>		
    </tiles:put>
</tiles:insert>